import React from 'react';
import {
  Form,
  Input,
  Button,
  DatePicker,
  Select,
  Table,
  Icon,
  Radio,
  InputNumber,
  Checkbox,
  Modal,
  message,
  notification,
  Affix,
  Upload,
  Row,
  Col
} from 'antd';
import InnerTable from 'components/DBTable/InnerTable.js';


const FormItem = Form.Item;
const ButtonGroup = Button.Group;

/**
 * 内部表格组件
 */
class ModuleInnerTable extends InnerTable {

  constructor(props) {
    super(props);
  }

   handleData = (obj) => {
    if (obj.actionState == this.modalActionState.Insert
      || obj.actionState == this.modalActionState.Update) {
        obj.params.parentId=this.props.requestParams.parentId;
    }
    return obj;
  }

   preDealTableData=(obj,newObj)=>{
    if (newObj.children) {
      newObj.children.forEach(function(value) {
        if (!value.key) {
          value.key = value.id;
        }
      });
    }
  }

}

export default ModuleInnerTable;
